<%--
*
* 作者： Sky
*
* 描述： 功能授权
*
--%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<jsp:directive.page import="com.toncen.samepms.net.dao.RoleChannelDao"/>
<%@include file="/share/header.jsp"%>
<%
	String roleId=request.getParameter("roleId");
	String[] channelIds=request.getParameterValues("channelIds");
	RoleChannelDao roleChannelDao=new RoleChannelDao();	
	if(channelIds==null){
		channelIds=request.getParameterValues("channelIds[]");	
	}
	try{
		roleChannelDao.beginTransaction();
		roleChannelDao.saveByRole(roleId,channelIds);
		roleChannelDao.commitTransaction();
	}catch(Exception e){
		roleChannelDao.rollback();
		throw e;
	}finally{
		roleChannelDao.endTransaction();
	}
%>